<html lang="en">
<head>
	<title>Search {% if query %}Results{% endif %}</title>
</head>
<body>
	<h1>Search</h1>
	<form action="." method="GET">
		<label for="q">Search: </label>
		<input type="text" name="q" value="{{ query|escape }}">
		<input type="submit" value="Search">
	</form>
	
	{% if results %}
		<h2>Results for "{{ query|escape }}":</h2>
		
		{% if results %}
			<ul>
			{% for game in results %}
				<li>{{ game }} </li>
			{% endfor %}
			</ul>
		{% else %}
			<p>No results found</p>
		{% endif %}
	{% endif %}
</body>
</html>  